package com.ruyuan.course.basic.biz.common;

import com.ruyuan.course.basic.biz.enums.ErrorCodeEnum;

/**
 * @author demo
 * version: 1.0
 * Description:
 **/
public class CommonResponse<T> {

    /**
     * 编码
     */
    private String resCode;

    /**
     * 状态码对应的消息
     */
    private String resMsg;

    /**
     * 数据
     */
    private T data;

    public CommonResponse() {
    }

    public CommonResponse(T data) {
        this.data = data;
        this.resCode = ErrorCodeEnum.SUCCESS.getCode();
        this.resMsg = ErrorCodeEnum.SUCCESS.getMessage();
    }

    public String getResCode() {
        return resCode;
    }

    public void setResCode(String resCode) {
        this.resCode = resCode;
    }

    public String getResMsg() {
        return resMsg;
    }

    public void setResMsg(String resMsg) {
        this.resMsg = resMsg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}